home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#23 (Aug 87)
/
color menus source
/
MenuFun.R
< prev
Wrap
Text File
|
1987-06-17
|
5KB
|
309 lines
* MenuFun.R
* RMaker Source code for the resources to be included in
* the MenuFun application. Includes the Color Menu info.
*
MenuFun Rsrc
* Main Window, Quit Alert, About Alert & Text Edit Dialog
Type WIND
,128
MenuFun
40 106 240 406
Visible NoGoAway
0
0
Type ALRT
,128
50 106 230 406
128
4444
,129
50 106 150 406
129
444
Type DLOG
,130
50 56 175 456
Visible NoGoAway
3
0
130
Type DITL
,128
4
button
140 120 159 180
OK
staticText
20 65 39 235
MenuFun by Steve Sheets
staticText
40 50 59 250
Sample Mac // Menu Program
staticText
60 30 119 270
This program uses the Mac // Menu Manager to create Hierarchical and Color Menus.
,129
3
button
60 180 80 240
Cancel
button
60 60 80 120
OK
staticText
20 37 40 263
Do you wish to quit this program?
,130
4
button
85 110 105 170
OK
button
85 230 105 290
Cancel
staticText
20 20 40 160
Text to be Diplayed:
editText
45 20 65 380
* Menu Resources
Type MENU
,40
\14
About MenuFun...
(-
,41
File
Edit Text/E
(-
Quit/Q
,42
Edit
Undo/Z
(-
Cut/X
Copy/C
Paste/V
Clear
* Menu containing various Menu Items that are attached
* to other SubMenus (ie. Hierarchical Menu). Note the
* inserted hex values using the \ command. Ex:
* /\1B sets Keyboard Equivalent to $1B and !\2C sets
* Character Mark to $2C or 44 (Color Menu ID number).
,43
Display
Color/\1B!\2C
Font/\1B!\2D
Size/\1B!\2E
Style/\1B!\2F
Justification/\1B!\30
* SubMenus attached to Display Menu
,44
Color
Foreground/\1B!\31
Background/\1B!\32
,45
Font
,46
Font
9
10
12
18
24
32
,47
Style
Bold<B/B
Italic<I/I
Underline<U/U
Outline<O/O
Shadow<S/S
Condense
Extended
,48
Justification
Right/R
Left/L
Center
* SubMenus attached to Color SubMenu
,49
Foreground
Black
White
Red
Green
Blue
Cyan
Magenta
Yellow
,50
Background
Black
White
Red
Green
Blue
Cyan
Magenta
Yellow
* Starting Display Text
Type STR#
,128
1
Welcome to MenuFun
* Menu Color Resources
* First comes the number of entries. Each entry contatins
* the Menu ID number & the Menu Item number, followed by
* 4 RGB values (three 16-bit integers in Hex) ending with
* a single integer filler.
Type mctb = GNRL
* For MMenu Bar Entry (ID #0), Default Title & Title Background Color
* is Green on White, while Default Item (Command, Mark & Name)
* and Item Background is Blue on White.
,0
* Number of entries
.I
1
.I
* Menu ID number & the Menu Item number, in this case 0 & 0
* Menu Bar Entry.
0 0
.H
* 4 RGB Colors each containing 3 integers (Green, White,
* Blue, White) and the final placing holding integer.
0000 FFFF 0000 FFFF FFFF FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
* For Apple Menu (ID #40), 3 entries. Title & Title Background Color
* is Green on White, while Default Item (Command, Mark & Name)
* and Item Background is Red on White. Items 1 & 2 set Mark,
* Command and Name Color to Blue and Background to White.
,40
.I
3
.I
40 0
.H
0000 FFFF 0000 FFFF FFFF FFFF FFFF 0000 0000 FFFF FFFF FFFF 0000
.I
40 1
.H
0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
.I
40 2
.H
0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
* For Foreground Menu (ID #49), 8 entries (1 per Menu Item).
* 1st and 2nd Items, Mark, Command and Name colors are black,
* while Background color is White. 3rd through 8th Items are
* the same as 1st Item, except that the Mark, Command and Name
* colors are Red, Green, Blue, Cyan, Magenta or Yellow
* (in that order).
,49
.I
8
.I
49 1
.H
0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
.I
49 2
.H
0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
.I
49 3
.H
FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF 0000
.I
49 4
.H
0000 FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 FFFF FFFF FFFF 0000
.I
49 5
.H
0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
.I
49 6
.H
0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF FFFF 0000
.I
49 7
.H
FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF 0000
.I
49 8
.H
FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF 0000
* For Background Menu (ID #50), identical to Foreground Menu.
,50
.I
8
.I
50 1
.H
0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
.I
50 2
.H
0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
.I
50 3
.H
FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF 0000
.I
50 4
.H
0000 FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 FFFF FFFF FFFF 0000
.I
50 5
.H
0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
.I
50 6
.H
0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF FFFF 0000
.I
50 7
.H
FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF 0000
.I
50 8
.H
FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF 0000